package com.monitorRoutine.monitorRoutineController.task;

import com.monitorRoutine.monitorRoutineController.service.ControlCommandService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
@EnableScheduling
@Slf4j
public class ControlCommandServiceTask {
    @Autowired
    private RedisTemplate<String, String> redisTemplate;
    @Autowired
    ControlCommandService controlCommandService;
//    @Value("${format.name}")
//    String NAME;
    @Scheduled(cron = "0 */1 * * * *")
    public void scanCommand(){
        controlCommandService.scanCommand ();
    }

//    @Scheduled(cron = "0 */1 * * * *")
//    public void registration(){
//        redisTemplate.opsForSet().add("redisTemplateList",NAME);
//    }
}
